﻿using System;
using RAP.Framework.Libary.DomTemplateBuilder.Attributes;
using RAP.Framework.Libary.DomTemplateBuilder.Handler.DictionaryActions.Add;
using RAP.Framework.Libary.Utils;

namespace RAP.Framework.Libary.DomTemplateBuilder.Element.DictionaryActions.Add
{
	/// <summary>
	/// 添加字典项节点
	/// </summary>
	[TagHandler( "Dictionary.Value", typeof( AddValueActionHandler ) )]
    public class AddValueAction : DictionaryAddActionElement
    {
        /// <summary>
        /// 值类型
        /// </summary>
        private TypeCode? _type = null;
		public TypeCode ValueType
        {
            get
            {
                if ( _type == null )
                {
					_type = this.ToEnumValue<TypeCode> ( "ValueType", TypeCode.String );
                }
                return _type.Value;
            }
        }
    }
}
